package com.witmore.skyline.db.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Builder;
import lombok.Getter;
import lombok.Setter;

import java.io.Serial;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.LocalTime;

/**
 * <p>
 * 设备日报
 * </p>
 *
 * @author 豆子高
 * @since 2025-02-24
 */
@Builder
@Getter
@Setter
@TableName("skyline_device_daily_report")
public class DeviceDailyReportDO implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 主键id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 日报日期
     */
    @TableField("report_date")
    private LocalDate reportDate;
    /**
     * skyline_device表id
     */
    @TableField("skyline_device_id")
    private Integer skylineDeviceId;

    /**
     * 企业id
     */
    @TableField("org_id")
    private Integer orgId;

    /**
     * 项目部id
     */
    @TableField("project_id")
    private Integer projectId;

    /**
     * 项目部名称
     */
    @TableField("project_name")
    private String projectName;

    /**
     * 工时 （单位：小时）
     */
    @TableField("work_time")
    private Double workTime;

    /**
     * 加油量
     */
    @TableField("oil_add")
    private Double oilAdd;

    /**
     * 加油量
     */
    @TableField("oil_add_custom")
    private Double oilAddCustom;

    /**
     * 油耗
     */
    @TableField("oil_consumption")
    private Double oilConsumption;

    /**
     * 最早开始工作时间
     */
    @TableField("early_start_time")
    private LocalTime earlyStartTime;

    /**
     * 最晚工作结束时长
     */
    @TableField("latest_end_time")
    private LocalTime latestEndTime;

    /**
     * 平均油耗L/h
     */
    @TableField("oil_consumption_average")
    private Double oilConsumptionAverage;

    /**
     * 怠速时间
     */
    @TableField("idle_time")
    private BigDecimal idleTime;

    /**
     * 负荷工作时间
     */
    @TableField("load_work_time")
    private BigDecimal loadWorkTime;

    /**
     * 创建时间
     */
    @TableField("create_time")
    private LocalDateTime createTime;

    /**
     * 更新时间
     */
    @TableField("update_time")
    private LocalDateTime updateTime;
}
